package com.cdy.demo.algorithm;

import java.util.ArrayList;
import java.util.List;

public class Leetcode401 {

	public static void main(String[] args) {
		Leetcode401 Leetcode5 = new Leetcode401();
	}

	List<String> list = new ArrayList<>();

	public List<String> readBinaryWatch(int num) {
		int cur=0;
		// 1011 -> 11 111011 -> 59
		int[] time = new int[]{0, 0, 0, 0, 0, 0, 0, 0, 0, 0};

		dfs(num, 0, time);
		return list;

	}

	private void dfs(int num, int cur, int[] time) {
		if (cur == num) {
			if (valid(time)) {
				list.add(toTime(time));
			}
			return;
		}
		for (int i = cur; i < time.length; i++) {
			if (time.length - i <= num) {
				return;
			}
			time[i]++;
			dfs(num, cur++, time);
			time[i]--;
		}

	}

	private String toTime(int[] time) {

		return null;
	}

	private boolean valid(int[] time) {
		return false;
	}

}
